package cn.doyens.test;

public class App {
    public static void main(String[] args) {
        int[] a={7,3,1,8,5,7,2,6,10,55};
        getMinAndMax(a);
    }
    public static void getMinAndMax(int[] it){
        int max=0;//最大
        int man=250000;//最小
        for (int i : it) {
            max=max>i?max:i;
            man=man<i?man:i;
        }
        System.out.println("最大为:"+max);
        System.out.println("最小为:"+man);
    }
}
